import request from "@/utils/request";

// 查询告警规则明细列表
export function listConfig(query) {
  return request({
    url: "/alarm/config/list",
    method: "get",
    params: query
  });
}

// 查询告警规则明细详细
export function getConfig(ruleConfigId) {
  return request({
    url: "/alarm/config/" + ruleConfigId,
    method: "get"
  });
}

// 新增告警规则明细
export function addConfig(data) {
  return request({
    url: "/alarm/config",
    method: "post",
    data: data
  });
}

// 修改告警规则明细
export function updateConfig(data) {
  return request({
    url: "/alarm/config",
    method: "put",
    data: data
  });
}

// 删除告警规则明细
export function delConfig(ruleConfigId) {
  return request({
    url: "/alarm/config/" + ruleConfigId,
    method: "delete"
  });
}

// 导出告警规则明细
export function exportConfig(query) {
  return request({
    url: "/alarm/config/export",
    method: "get",
    params: query
  });
}
